package com.app.designpatternslearn.behavior.visitorpattern

import com.app.designpatternslearn.behavior.visitorpattern.code.ComputerShop
import com.app.designpatternslearn.behavior.visitorpattern.code.PhoneShop
import com.app.designpatternslearn.behavior.visitorpattern.code.SalesVisitor
import com.app.designpatternslearn.behavior.visitorpattern.code.Store

fun main() {

    val store = Store()

    val phoneShop = PhoneShop()
    phoneShop.number = 11
    phoneShop.profits = 100

    val computerShop = ComputerShop()
    computerShop.number = 22
    computerShop.profits = 220

    store.attach(phoneShop)
    store.attach(computerShop)

    store.accept(SalesVisitor())

}